<template>
	<BasePopup
		v-model="walletStore.show.submitFiatDepositResult"
		titleT="deposit.result.title"
		titleIcon="download"
		:maskClosable="false">
		<component :is="comp" />
	</BasePopup>
</template>

<script setup lang="ts">
import { BasePopup } from '@/components/base'
import { useWalletStore } from '@/store'
import ResultDefault from './result-default.vue'
import ResultGbBind from './result-gb-bind.vue'
import ResultGbDeposit from './result-gb-deposit.vue'
import { computed } from 'vue'

const walletStore = useWalletStore()
const comp = computed(() => {
	const res = walletStore.submitFiatDepositResult
	if (res.currency === 'CNY_GB' && res.cnyGb === false) {
		return ResultGbBind
	} else if (res.currency === 'CNY_GB' && res.cnyGb === true) {
		return ResultGbDeposit
	} else {
		return ResultDefault
	}
})
</script>

<style scoped></style>
